Kafka Producer
Description
The Kafka producer channel is used to write Orchestra messages as events into a topic on a kafka cluster.
Creation
To create a Kafka producer follow the steps described in the general description of Adapters.
Configuration
-
Connection
In the combo box Connection, select an environment entry of type Kafka connection. -
Topic
Enter the Kafka topic to which this channel shall write its events. -
Synchronous Mode
If Synchronous is selected, the channel waits for a response from the Kafka broker when an event is written.
In this mode, the channel provides the following response parameters:- TIMESTAMP – timestamp of the stored event
- PARTITION – partition to which the event was written
- OFFSET – offset of the stored event
-
Topic as Parameter
If Topic as parameter is selected:- The Topic field is disabled
- A new required parameter TOPIC is added
- The caller must provide the topic as a parameter
-
Partition as Parameter
If Partition as parameter is selected:- A new required parameter PARTITION is added
- The caller must provide the partition as a parameter
Normally, the partition is not set explicitly.
It is automatically selected by the Kafka broker. -
Timestamp as Parameter
If Timestamp as parameter is selected:- A new required parameter TIMESTAMP is added
- The caller must provide the timestamp of the event
Normally, the timestamp is not set explicitly.
The insertion time is automatically assigned by the Kafka broker. -
Header as Parameter
If Header as parameter is selected:- A new required parameter HEADERS is added
- The parameter must be a JSON message containing a JSON object
that represents all header parameters to be added to the event
The Orchestra producer channel always writes a header named Content-Type:
application/jsonfor JSON messagestext/xmlfor XML messages- For binary messages, the value depends on the message type and may vary